// 1.引入模块
import Vuex from "vuex";
import Vue from "vue"
// import { reqCategoryListData } from "@/api";
import home from "./module/home"
import search from "./module/search"
import detail from "./module/detail"
import user from "./module/user"
import trade from "./module/trade"
// 2.注册Vuex
Vue.use(Vuex)

// 3.添加相应的模块
const state = {
    categoryList:[]
}
const actions = {
    //获取三级分数据
    // async getCategoryListData(context){
    //     const result = await  reqCategoryListData()
    //     if(result.code === 200){
    //         console.log(result.data);
    //     }else{
    //         console.log(result.message);
    //     }
    // }
}
const mutations = {}
const getters ={}

// 4.导出
export default new Vuex.Store({
    modules:{home,search,detail,user,trade}
})